package cn.tedu.sp09.feign;


import cn.tedu.sp01.pojo.Order;
import cn.tedu.sp01.pojo.User;
import cn.tedu.web.util.JsonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name="order-service",fallback =OrderClientFB.class)//调用向eureka注册的item-service服务器
public interface OrderClient {

    @GetMapping("/{orderId}")//调用item-service服务器中的"/{orderId}"这个请求业务
    JsonResult<Order> getorder(@PathVariable String orderId);
    @GetMapping("/")
    JsonResult<?> addOrder();

}
